gtk4.git
9 years agoDrop gtk_init_with_args
Matthias Clasen [Tue, 27 Dec 2016 23:31:03 +0000 (18:31 -0500)]
Drop gtk_init_with_args

We want to simplify our initialization code and remove all commandline
argument handling from it. The first stop for this is to reduce the
number of gtk_init variants we have.

9 years agogdk: Skip GdkVulkanContext methods when building introspection data
Emmanuele Bassi [Thu, 19 Jan 2017 18:18:07 +0000 (18:18 +0000)]
gdk: Skip GdkVulkanContext methods when building introspection data

We cannot use Vulkan types through introspection anyway.

9 years agowayland: Push NULL buffer when hiding a GdkWindow
Carlos Garnacho [Thu, 19 Jan 2017 15:07:13 +0000 (16:07 +0100)]
wayland: Push NULL buffer when hiding a GdkWindow

This is how windows are meant to be hidden as per the wayland
protocol, there's no need to destroy the xdg_surface and other
interfaces.

Also, rename gdk_wayland_window_hide_surface() to clear_surface(),
as that's what it does.

https://bugzilla.gnome.org/show_bug.cgi?id=773686

9 years agocombobox: Avoid a pointless assignment
Daniel Boles [Thu, 19 Jan 2017 03:26:09 +0000 (03:26 +0000)]
combobox: Avoid a pointless assignment

Don’t get the active item pointer before the grid/non-grid conditional,
because if we’re in grid mode, we re-get it before selecting it anyway.

9 years agocombobox: Also preselect active item in grid popup
Daniel Boles [Thu, 19 Jan 2017 03:12:32 +0000 (03:12 +0000)]
combobox: Also preselect active item in grid popup

i.e. when wrap-width > 0. This was only being done for non-grid cases.
So, ComboBoxes in grid mode did not indicate their selection when popped
up and required users to keynav from ‘nothing’ (at the top-left) to the
item they wanted to select. By selecting the active item in advance, now
it’s highlighted & acts as the starting point for keynav around the grid

9 years agoscale: Really fix documentation of set_digits()
Daniel Boles [Thu, 19 Jan 2017 00:44:35 +0000 (00:44 +0000)]
scale: Really fix documentation of set_digits()

This previously only mentioned its effect on the displayed value, and
even after the previous commit, its rounding of the actual value upon
change still reads like too much of an afterthought. Worse, it wasn’t
mentioned at all in the doc for the @digits parameter. Change this to
emphasise rounding always occurs and the displayed value is secondary.

9 years agoscale: doc: set_digits doesn’t round retroactively
Daniel Boles [Wed, 18 Jan 2017 23:42:55 +0000 (23:42 +0000)]
scale: doc: set_digits doesn’t round retroactively

Whether it should is an open question, but for now, the documentation
should clearly indicate that currently rounding is only applied upon
changes to the value, not to the existing value when ::digits changes.
This is already clear in the doc for the underlying Range::round-digits.

https://bugzilla.gnome.org/show_bug.cgi?id=358970

9 years agoScale: Always sync ::digits to Range::round-digits
Daniel Boles [Wed, 18 Jan 2017 22:54:42 +0000 (22:54 +0000)]
Scale: Always sync ::digits to Range::round-digits

The documents state that gtk_scale_set_digits() “causes the value of the
adjustment to be rounded off to this number of digits, so the retrieved
value matches the value the user saw.” Note the lack of any condition.

But in fact, if draw-value was false, rounding was disabled on the base
Range, so values that weren’t displayed weren’t rounded. This made the
docs wrong and made an apparently cosmetic detail alter functionality.

Fix by ensuring the number of digits set on Scale is always propagated
along to gtk_range_set_round_digits(), thus rounding to it in all cases
when the value changes, regardless of whether the value is displayed.

This doesn’t address the other idea from Bugzilla: that changing the
number of digits should clamp the _existing_ value if it’s more precise.
This contradicts digits docs in the base Range, but the above from Scale
can be read as implying it’ll happen. For now, that’s an open question.

https://bugzilla.gnome.org/show_bug.cgi?id=358970

9 years agocombobox: Work around popup handler altering model
Daniel Boles [Wed, 18 Jan 2017 22:22:52 +0000 (22:22 +0000)]
combobox: Work around popup handler altering model

GtkFileChooserButton installs a handler for the popped-up signal, which
refilters the menu, in order to hide the “(None)” item from the popup
if it was previously selected in the ComboBox. This oddity means that:

 • Until recently, this item would be selected in the menu shell, which
   would then be popped up and change the selection away from that item.
   This was therefore redundant (more on which below!) but benign.

 • After the patch for https://bugzilla.gnome.org/show_bug.cgi?id=771242
   however, this causes a critical assertion fail, as now we stash the
   originally selected item in a pointer so that it can be selected only
   after realisation/popup – but by that stage, the model has just been
   refiltered and the previous pointer no longer refers to a valid item.

This commit works around this problem by, after popping up the menu,
getting the active item again, in case a popped-up handler has gone and
invalidated the pointer to the active item that we saved before popup.

If a handler does this, everything done to find/use the original item is
pointless. But this avoids the ugly critical in FileChooserButton, while
not harming every other ComboBox that doesn’t mess with its model while
popping up (hopefully the vast majority), and it’s very difficult to
imagine a way to check if the active item is /going to/ be hidden later)

9 years agocombobox: Don’t select active item if it’s hidden
Daniel Boles [Wed, 18 Jan 2017 22:17:37 +0000 (22:17 +0000)]
combobox: Don’t select active item if it’s hidden

I hope no one ever actually brings such a silly item into this world,
but this achieves symmetry with the similar checks immediately after.

9 years agocombobox: Move variables into narrowest scopes
Daniel Boles [Wed, 18 Jan 2017 21:20:10 +0000 (21:20 +0000)]
combobox: Move variables into narrowest scopes

9 years agoUpdate Slovak translation
Dušan Kazik [Wed, 18 Jan 2017 20:50:55 +0000 (20:50 +0000)]
Update Slovak translation

9 years agovulkan: Fix copy/paste error
Benjamin Otte [Wed, 18 Jan 2017 15:46:04 +0000 (16:46 +0100)]
vulkan: Fix copy/paste error

9 years agovulkan: Add compiled shaders
Benjamin Otte [Wed, 18 Jan 2017 15:42:01 +0000 (16:42 +0100)]
vulkan: Add compiled shaders

I forgot to include them when adding the shaders.

9 years agovulkan: Compute right size for outset shadow
Benjamin Otte [Wed, 18 Jan 2017 15:39:27 +0000 (16:39 +0100)]
vulkan: Compute right size for outset shadow

We were emitting the box and not the shadow box as the rectangle. So we
didn't draw any shadows. Oops.

9 years agocss: Remove deprecated number-as-pixels compatibility
Benjamin Otte [Wed, 18 Jan 2017 03:12:15 +0000 (04:12 +0100)]
css: Remove deprecated number-as-pixels compatibility

Previously, for compatibility with GTK 3.0, we allowed specifying
numbers without units and interpreted them as pixels, even when the CSS
specification didn't.

Remove that now that we can break API.

9 years agovulkan: Add support for unblurred box-shadow
Benjamin Otte [Wed, 18 Jan 2017 03:07:09 +0000 (04:07 +0100)]
vulkan: Add support for unblurred box-shadow

9 years agorendernode: Add getters for box-shadow nodes
Benjamin Otte [Tue, 17 Jan 2017 23:05:25 +0000 (00:05 +0100)]
rendernode: Add getters for box-shadow nodes

9 years agodocs: Remove mention of GdkColor
Benjamin Otte [Tue, 17 Jan 2017 19:59:19 +0000 (20:59 +0100)]
docs: Remove mention of GdkColor

9 years agoRevert "filechooser portal: Make sure we can save"
Matthias Clasen [Tue, 17 Jan 2017 19:14:34 +0000 (14:14 -0500)]
Revert "filechooser portal: Make sure we can save"

This reverts commit 4875c689a0e826604953965ffdb71d8b82cae364.

This was a thinko. Writable is not actually settable from the
application side, but only for the user, from the backend side.

9 years agofilechooser portal: Make sure we can save
Matthias Clasen [Tue, 17 Jan 2017 19:08:38 +0000 (14:08 -0500)]
filechooser portal: Make sure we can save

Explicitly request files for saving to be writable, otherwise
we are at the mercy of the portal, which currently gets it wrong.

9 years agogdk/wayland: Always get the seat's key modifiers from the GdkKeymap
Rui Matos [Wed, 11 Jan 2017 18:12:12 +0000 (19:12 +0100)]
gdk/wayland: Always get the seat's key modifiers from the GdkKeymap

Elsewhere we already go through the keymap to get modifiers so we
should do the same here. In fact, this was relying on xkb modifier
mask values being bitwise compatible with GdkModifierType which isn't
necessarily true.

https://bugzilla.gnome.org/show_bug.cgi?id=770112

9 years agogdk/wayland: Don't add GDK_META_MASK to gdk mod masks if MOD1 is set
Rui Matos [Wed, 11 Jan 2017 17:33:11 +0000 (18:33 +0100)]
gdk/wayland: Don't add GDK_META_MASK to gdk mod masks if MOD1 is set

Gtk+ treats MOD1 as a synonym for Alt, and does not expect it to be
mapped around, so we should avoid adding GDK_META_MASK if MOD1 is
already included to avoid confusing gtk+ and applications that rely on
that behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=770112

9 years agowayland: Handle subsurface as popup parent
Jonas Ådahl [Thu, 5 Jan 2017 08:01:49 +0000 (16:01 +0800)]
wayland: Handle subsurface as popup parent

When a subsurface is used as a parent of a popup, GDK needs to traverse
up to the transient-for as the next parent, to properly find the parent
used by the popup positioner. This is because the parent of a popup
must always either be an xdg_popup or an xdg_surface, but traversing
the "parent" (in GDK terms) upwards from a subsurface will end up on
the fake root window before we hit the actual parent (in Wayland terms).

https://bugzilla.gnome.org/show_bug.cgi?id=776225

9 years agovulkan: Add fallback message for node-as-texture
Benjamin Otte [Tue, 17 Jan 2017 05:38:36 +0000 (06:38 +0100)]
vulkan: Add fallback message for node-as-texture

This is mainly to motivate me to implement it.

9 years agovulkan: Generate clip shaders from same source
Benjamin Otte [Tue, 17 Jan 2017 05:15:03 +0000 (06:15 +0100)]
vulkan: Generate clip shaders from same source

Instead of having 3 different shaders for the different clipping
versions, just have one shader and use a preprocessor define to use
different clip functions.

That preprocessor define is set in the Makefile.

Also use foo.frag and foo.vert as the file extensions instead of using
foo.frag.glsl and foo.vert.glsl, as that's what glslc suggests as
extension.

9 years agovulkan: Add clip.vert.glsl
Benjamin Otte [Tue, 17 Jan 2017 04:50:52 +0000 (05:50 +0100)]
vulkan: Add clip.vert.glsl

Implement clipping the same way as in the last commit for the
fragment shaders.

9 years agovulkan: Add a clip.frag.glsl include
Benjamin Otte [Tue, 17 Jan 2017 04:36:03 +0000 (05:36 +0100)]
vulkan: Add a clip.frag.glsl include

This include is supposed to handle clipping for the different clipping
methods.

So far, we only use it in the rounded rect cases.

9 years agovulkan: Add push constants to fragment shader
Benjamin Otte [Tue, 17 Jan 2017 04:20:07 +0000 (05:20 +0100)]
vulkan: Add push constants to fragment shader

That way we don't need to move the clip rounded rect manually through
the vertex shader into the fragment shader but can just look at the push
constants.

Simplifies shaders a lot.

9 years agovulkan: Move push constants into their own header
Benjamin Otte [Tue, 17 Jan 2017 01:20:08 +0000 (02:20 +0100)]
vulkan: Move push constants into their own header

This is the first step towards easing maintenance of the Vulkan shaders
by moving common code into headers.

9 years agowayland: avoid an unnecessary g_list_length call
Mohammed Sadiq [Tue, 17 Jan 2017 02:36:46 +0000 (08:06 +0530)]
wayland: avoid an unnecessary g_list_length call

https://bugzilla.gnome.org/show_bug.cgi?id=777363

9 years ago3.89.3
Matthias Clasen [Mon, 16 Jan 2017 20:44:52 +0000 (15:44 -0500)]
3.89.3

9 years agoWe no longer have gdktestutils
Matthias Clasen [Mon, 16 Jan 2017 22:49:35 +0000 (17:49 -0500)]
We no longer have gdktestutils

Update the docs build to reflect that.

9 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 16 Jan 2017 20:33:24 +0000 (21:33 +0100)]
Updated Spanish translation

9 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 16 Jan 2017 20:33:13 +0000 (21:33 +0100)]
Updated Spanish translation

9 years agoswitch: Fix build
Timm Bäder [Mon, 16 Jan 2017 20:01:59 +0000 (21:01 +0100)]
switch: Fix build

Partial revert of 2b6b5c1c8fecdd66172516812ed3f1825619dafc, which
removed a little too much.

9 years agoswitch: Remove some unused code
Timm Bäder [Mon, 16 Jan 2017 17:15:22 +0000 (18:15 +0100)]
switch: Remove some unused code

9 years agogtkentryprivate: Remove unused prototype
Timm Bäder [Fri, 13 Jan 2017 20:17:08 +0000 (21:17 +0100)]
gtkentryprivate: Remove unused prototype

9 years agoscalebutton: Use GtkButon:icon-name in the ui file
Timm Bäder [Fri, 13 Jan 2017 20:09:14 +0000 (21:09 +0100)]
scalebutton: Use GtkButon:icon-name in the ui file

9 years agospinbutton: Restore gtk3 focus behavior
Timm Bäder [Fri, 13 Jan 2017 14:24:44 +0000 (15:24 +0100)]
spinbutton: Restore gtk3 focus behavior

Focus the spinbutton on button press, never focus the buttons.

9 years agoinspector: Use GtkButton:icon-name in ui files
Timm Bäder [Fri, 13 Jan 2017 20:08:59 +0000 (21:08 +0100)]
inspector: Use GtkButton:icon-name in ui files

9 years agoentry: Remove unused struct member
Timm Bäder [Fri, 13 Jan 2017 20:13:07 +0000 (21:13 +0100)]
entry: Remove unused struct member

9 years agogtk4-section: Add GtkInfoBar:revealed setter+getter
Timm Bäder [Sat, 14 Jan 2017 07:20:43 +0000 (08:20 +0100)]
gtk4-section: Add GtkInfoBar:revealed setter+getter

9 years agowayland: avoid 0 width/height anchor rectangle
Olivier Fourdan [Thu, 12 Jan 2017 17:08:32 +0000 (18:08 +0100)]
wayland: avoid 0 width/height anchor rectangle

Passing a rectangle with zero width or height to xdg_shell-v6
set_anchor_rect() will cause a protocol error and terminate the client,
as with gedit when pressing the Win key.

Reason for this is because the rectangle used to set the anchor comes
from gtk_text_layout_get_iter_location() which uses the pango layout
width/height, which can be empty if there is not character at the given
location.

Make sure we don't use 0 as width or height as an anchor rectangle to
avoid the protocol error, and compensate the logical position of the
given rectangle if the size is changed, so that the actual position
remains as expected by the client.

https://bugzilla.gnome.org/show_bug.cgi?id=777176

9 years agoVisual Studio builds: Update gsk project
Chun-wei Fan [Mon, 16 Jan 2017 05:47:21 +0000 (13:47 +0800)]
Visual Studio builds: Update gsk project

Another Vulkan renderer source was added, so include them in the builds.

9 years agogrid: Fix plural error in docs' @Short_description
Daniel Boles [Sun, 15 Jan 2017 20:37:49 +0000 (20:37 +0000)]
grid: Fix plural error in docs' @Short_description

9 years agoUpdate Catalan translation
Jordi Mas [Sun, 15 Jan 2017 19:18:08 +0000 (20:18 +0100)]
Update Catalan translation

9 years agosnapshot: Rename gtk_snapshot_translate_2d()
Benjamin Otte [Fri, 13 Jan 2017 13:36:56 +0000 (14:36 +0100)]
snapshot: Rename gtk_snapshot_translate_2d()

It's now called gtk_snapshot_offset().

9 years agoUpdate Catalan translation
Jordi Mas [Fri, 13 Jan 2017 05:51:42 +0000 (06:51 +0100)]
Update Catalan translation

9 years agosnapshot: Rename append APIs
Benjamin Otte [Fri, 13 Jan 2017 03:46:09 +0000 (04:46 +0100)]
snapshot: Rename append APIs

Instead of having gtk_snapshot_append_foo_node(), just have
gtk_snapshot_append_foo(). Nobody needs to know that this internally
uses nodes.

9 years agocssimage: Fallback images have no aspect ratio
Benjamin Otte [Fri, 13 Jan 2017 00:43:07 +0000 (01:43 +0100)]
cssimage: Fallback images have no aspect ratio

The aspect ratio for fallback image was incorrectly set to 1.

Reftest is included.

9 years agocssimage: Scale images to contain, not cover
Benjamin Otte [Fri, 13 Jan 2017 02:28:34 +0000 (03:28 +0100)]
cssimage: Scale images to contain, not cover

Images with just an aspect ratio, but without a size, should be scaled
to be fully visible in the given area.
But we scaled them to completely cover the given area, which made them
partially invisible.

Reftest included.

9 years agosnapshot: Redo pop() API
Benjamin Otte [Thu, 12 Jan 2017 23:39:59 +0000 (00:39 +0100)]
snapshot: Redo pop() API

gtk_snapshot_pop() => removed
gtk_snapshot_pop_and_append() => gtk_snapshot_pop()

So now there is no way to get a rendernode out of the snapshotting API
until you gtk_snapshot_finish().

9 years agosnapshot: Add gtk_snapshot_push_blend()
Benjamin Otte [Thu, 12 Jan 2017 22:20:31 +0000 (23:20 +0100)]
snapshot: Add gtk_snapshot_push_blend()

and use it for backgrounds.

9 years agoreftests: Fix test
Benjamin Otte [Thu, 12 Jan 2017 22:20:11 +0000 (23:20 +0100)]
reftests: Fix test

No, GtkActions don't need to be part of this test.

9 years agostack: Build stored render node with custom Snapshot object
Benjamin Otte [Thu, 12 Jan 2017 21:49:53 +0000 (22:49 +0100)]
stack: Build stored render node with custom Snapshot object

This is in preparation for API changes in GtkSnapshot.

9 years agoAdd gtk_snapshot_push_cross_fade()
Benjamin Otte [Thu, 12 Jan 2017 21:00:38 +0000 (22:00 +0100)]
Add gtk_snapshot_push_cross_fade()

... and use it.

The function is a bit awkward because it requires 2 calls to
gtk_snapshot_pop(), but once you accept that, it's very convenient to
use, as can be seen by the 2 implementations.

9 years agomir: use modal window hint
William Hua [Thu, 12 Jan 2017 22:16:27 +0000 (17:16 -0500)]
mir: use modal window hint

9 years agowidget-factory: Add a system tab to the about dialog
Matthias Clasen [Thu, 12 Jan 2017 20:30:11 +0000 (15:30 -0500)]
widget-factory: Add a system tab to the about dialog

Just for trying it out.

9 years agoabout dialog: Add a "system" tab
Matthias Clasen [Fri, 30 Dec 2016 04:12:42 +0000 (23:12 -0500)]
about dialog: Add a "system" tab

This is a free-form tab that can contain information about the
system environment. To see it, set GtkAboutDialog::system-information
to a non-NULL value.

https://bugzilla.gnome.org/show_bug.cgi?id=776604

9 years agoactionbar: Notify when :revealed changes
Timm Bäder [Thu, 12 Jan 2017 14:14:25 +0000 (15:14 +0100)]
actionbar: Notify when :revealed changes

9 years agoinfobar: Fix copy&paste error in documentation
Timm Bäder [Thu, 12 Jan 2017 07:37:15 +0000 (08:37 +0100)]
infobar: Fix copy&paste error in documentation

Of course you shouldn't call gtk_dialog_response on a GtkInfoBar.

9 years agoinfobar demo: Adapt to GtkInfoBar changes
Timm Bäder [Thu, 12 Jan 2017 08:10:02 +0000 (09:10 +0100)]
infobar demo: Adapt to GtkInfoBar changes

Bind GtkToggleButton:active to GtkInfoBar:revealed instead of :visible.

9 years agoinfobar: Add :revealed property
Timm Bäder [Thu, 12 Jan 2017 08:09:22 +0000 (09:09 +0100)]
infobar: Add :revealed property

9 years agoinfobar: Keep GParamSpecs around
Timm Bäder [Thu, 12 Jan 2017 07:42:09 +0000 (08:42 +0100)]
infobar: Keep GParamSpecs around

So we can use them in notify_by_pspec

9 years agox11: Add call to XInitThreads()
Benjamin Otte [Thu, 12 Jan 2017 01:01:07 +0000 (02:01 +0100)]
x11: Add call to XInitThreads()

The Mesa Vulkan drivers need XInitThreads() being called, because their
implementation has to use threads.

And I don't want to make the call depend on if Vulkan is compiled in
because that makes GTK's X11 behavior depend on compile-time flags, so
it's always called.

9 years agoMore filter documentation updates
Matthias Clasen [Wed, 11 Jan 2017 19:07:56 +0000 (14:07 -0500)]
More filter documentation updates

Actually document the filter property, not just -gtk-icon-filter.

9 years agoCorrect the -gtk-icon-filter docs
Matthias Clasen [Wed, 11 Jan 2017 18:38:26 +0000 (13:38 -0500)]
Correct the -gtk-icon-filter docs

I was overlooking that it is possible to specify multiple
functions. Also add a reference to the relevant spec draft.

9 years agobuild: List resource files explicitly
Benjamin Otte [Wed, 11 Jan 2017 14:17:49 +0000 (15:17 +0100)]
build: List resource files explicitly

This way, we ensure that files that are built during make always get
properly listed. And we ensure that creating the resources actually
depends on them.

9 years agoshortcutswindow: Make dispose work properly
Benjamin Otte [Tue, 10 Jan 2017 14:59:26 +0000 (15:59 +0100)]
shortcutswindow: Make dispose work properly

9 years agotests: Add a rendernode test for borders
Benjamin Otte [Tue, 10 Jan 2017 14:41:11 +0000 (15:41 +0100)]
tests: Add a rendernode test for borders

9 years agovulkan: Add shader for border rendering
Benjamin Otte [Tue, 10 Jan 2017 13:59:20 +0000 (14:59 +0100)]
vulkan: Add shader for border rendering

9 years agoGtkSnapshot: Always use int for the translation
Alexander Larsson [Wed, 11 Jan 2017 15:14:03 +0000 (16:14 +0100)]
GtkSnapshot: Always use int for the translation

We already take ints when setting the translation, so it can't
currently take any other values. Additionally, I was seeing large
costs in int -> double -> int for the rects in
gtk_snapshot_clips_rect(), as all callers really are ints (widget
allocations) and the clip region is int-based.

This change completely cleared a 2% rectangle_init_from_graphene from
the profile and is likely to have nice performance effects elsewhere
too.

9 years agowidget: Avoid typechecks when accessing ->clip and ->allocation
Alexander Larsson [Wed, 11 Jan 2017 14:30:30 +0000 (15:30 +0100)]
widget: Avoid typechecks when accessing ->clip and ->allocation

9 years agoGtkCSSImage: Avoid some type checks
Alexander Larsson [Wed, 11 Jan 2017 14:28:35 +0000 (15:28 +0100)]
GtkCSSImage: Avoid some type checks

The width/height/aspect getters are called a lot, and almost all
callers already verify it from _gtk_css_image_get_concrete_size (),
so just skip these checks.

9 years agoAvoid some more type checks for internal calls
Alexander Larsson [Wed, 11 Jan 2017 14:27:51 +0000 (15:27 +0100)]
Avoid some more type checks for internal calls

9 years agogtkcssgadget: Use private non-checking versions of gtk_widget calls
Alexander Larsson [Wed, 11 Jan 2017 11:04:21 +0000 (12:04 +0100)]
gtkcssgadget: Use private non-checking versions of gtk_widget calls

This avoids a lot of checking overhead.

9 years agoGtkSnapshot: Reuse snapshot state objects
Alexander Larsson [Wed, 11 Jan 2017 10:41:46 +0000 (11:41 +0100)]
GtkSnapshot: Reuse snapshot state objects

Rather than allocate new ones all the time we reuse the previous ones.
We just clear them and save them in the parent for later reuse.

9 years agoGtkSnapshot: Move collect data to a union in the state
Alexander Larsson [Wed, 11 Jan 2017 10:21:27 +0000 (11:21 +0100)]
GtkSnapshot: Move collect data to a union in the state

This means we allocate the collect data with the state, avoiding
an extra allocation. Also, a union means every state object
is the same size and we could reuse the state objects.

9 years agoSnapshot: Only record names if inspector is recording
Alexander Larsson [Wed, 11 Jan 2017 09:08:58 +0000 (10:08 +0100)]
Snapshot: Only record names if inspector is recording

Otherwise we do a lot of allocations and vprintf calls which are
not used.

9 years agogsk_rounded_rect_init_copy: Don't normalize
Alexander Larsson [Wed, 11 Jan 2017 08:23:37 +0000 (09:23 +0100)]
gsk_rounded_rect_init_copy: Don't normalize

This was showing up quite high on the profiles, and there is
no real reason for copy to normalize, as the source is a
GskRoundedRect which should be normalized already unless
you did something very strange (and then you should have normalized
manually).

9 years agoSkip dynamic type check in css value getters
Alexander Larsson [Wed, 11 Jan 2017 07:51:04 +0000 (08:51 +0100)]
Skip dynamic type check in css value getters

This gets called a lot during snapshotting, and this change
alone brings down snapshot time by almost 10% in a syntethic
snapshot test.

9 years agoSome updates to the migration guide
Matthias Clasen [Wed, 11 Jan 2017 02:20:38 +0000 (21:20 -0500)]
Some updates to the migration guide

9 years agoDocument -gtk-icon-filter
Matthias Clasen [Wed, 11 Jan 2017 02:12:38 +0000 (21:12 -0500)]
Document -gtk-icon-filter

Not much detail here yet, but the syntax is documented.

9 years agocssimage: Fix cross-fade
Benjamin Otte [Wed, 11 Jan 2017 01:51:50 +0000 (02:51 +0100)]
cssimage: Fix cross-fade

Simgle image cross-fade opacity was computed the wrong way, which caused
weird fade-in/out animations, for example in flat buttons.

I messed this up when porting cross-fades to snapshot().

9 years agoRemove an unnecessary check
Matthias Clasen [Wed, 11 Jan 2017 00:53:08 +0000 (19:53 -0500)]
Remove an unnecessary check

Since the demise of theme engines, we can no longer hit
the case of id >= GTK_CSS_PROPERTY_N_PROPERTIES. So don't
check for this in a very frequently called function.

9 years agoUse an internal parameter check here as well
Matthias Clasen [Wed, 11 Jan 2017 00:52:22 +0000 (19:52 -0500)]
Use an internal parameter check here as well

We should not slow down the core parts of the css machinery
with type checks.

9 years agoUse gtk_internal_return_val_if_fail here
Matthias Clasen [Wed, 11 Jan 2017 00:47:58 +0000 (19:47 -0500)]
Use gtk_internal_return_val_if_fail here

It seems odd to have checks in just a few functions,
so switch everything over to use the internal versions.

9 years agoUse _gtk_widget_get_window more
Matthias Clasen [Tue, 10 Jan 2017 23:37:12 +0000 (18:37 -0500)]
Use _gtk_widget_get_window more

This avoids type checks in places where we know it is safe.

9 years agoRefactor some css transition code slightly
Matthias Clasen [Tue, 10 Jan 2017 23:34:50 +0000 (18:34 -0500)]
Refactor some css transition code slightly

Reshuffling things a bit to avoid a bunch of NULL and
type checks.

9 years agoUse the .symbolic.png assets in Adwaita
Matthias Clasen [Tue, 10 Jan 2017 22:13:51 +0000 (17:13 -0500)]
Use the .symbolic.png assets in Adwaita

Using an image() fallback from svg to png doesn't make too
much sense, since the svg is always used (unless librsvg is
not present), while the png icon is faster and cheaper to
load and thus preferable.

9 years agogdk/wayland: Handle non-existant gsettings keys
Rui Matos [Mon, 9 Jan 2017 16:47:54 +0000 (17:47 +0100)]
gdk/wayland: Handle non-existant gsettings keys

Since we're a library, crashing on gsettings keys, whose presence is out
of our control, isn't appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=775846

9 years agogdk/wayland: Add support for the gtk-enable-primary-paste gsetting
Rui Matos [Thu, 8 Dec 2016 17:18:53 +0000 (18:18 +0100)]
gdk/wayland: Add support for the gtk-enable-primary-paste gsetting

The gsetting was recently added so that we can have this configurable
on the wayland backend too.

https://bugzilla.gnome.org/show_bug.cgi?id=775846

9 years agomir: fix compile-time warnings
William Hua [Mon, 9 Jan 2017 22:54:37 +0000 (17:54 -0500)]
mir: fix compile-time warnings

9 years agorevealer: Fix a typo in a function doc
Daniel Boles [Mon, 9 Jan 2017 22:34:30 +0000 (22:34 +0000)]
revealer: Fix a typo in a function doc

Also, "ie" wasn't very clear, but fixing that to "i.e." would cause
truncation of the summary when processed by bindings using doxygen. So,
I replaced it with "in other words", which is no _less_ clear, at least.

9 years agomir: properly handle empty clipboard
William Hua [Mon, 9 Jan 2017 17:04:48 +0000 (12:04 -0500)]
mir: properly handle empty clipboard

https://bugzilla.gnome.org/show_bug.cgi?id=775732

9 years agoVisual Studio builds: Move project files to win32/
Chun-wei Fan [Mon, 9 Jan 2017 07:33:25 +0000 (15:33 +0800)]
Visual Studio builds: Move project files to win32/

It was suggested that the project files to be moved to win32/, so that we can
have one less layer of directories we need to go down into to reach the project files.

9 years agobuild/Makefile.msvcproj: Improve documentation
Chun-wei Fan [Mon, 9 Jan 2017 04:11:33 +0000 (12:11 +0800)]
build/Makefile.msvcproj: Improve documentation

Tell people about what happens when generating projects when Visual
Studio 2013 or later is required, and mention that the .headers are
only needed when headers need to be copied.

9 years agocssgadget: Compute clip correctly
Benjamin Otte [Mon, 9 Jan 2017 00:10:22 +0000 (01:10 +0100)]
cssgadget: Compute clip correctly

We were computing it relative to the gadget allocation, but it should be
relative to the widget allocation.

9 years agowidget: Document child/sibling accessors
Timm Bäder [Sun, 8 Jan 2017 15:58:27 +0000 (16:58 +0100)]
widget: Document child/sibling accessors